<test>
  <sql>SELECT	SUM((
				SELECT	1
				FROM	Orders o
				WHERE	o.EmployeeID = e.EmployeeID
			))
FROM	Employees e</sql>
  <expectedErrors>
    <expectedError id="AggregateCannotContainAggregate" text="Cannot perform aggregate function on an expression containing a subquery: &quot;SUM&quot;((   SELECT 1&#xD;&#xA;     FROM Orders AS o&#xD;&#xA;    WHERE &quot;o&quot;.&quot;EmployeeID&quot; = &quot;e&quot;.&quot;EmployeeID&quot;))." />
  </expectedErrors>
</test>